package com.improve.frame.db.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 *      多租户配置
 * @Author wzxing918
 * @Date 2021-03-31
 * @Version 1.0.0
 **/
@Setter
@Getter
@ConfigurationProperties(prefix = "improve.tenant")
@RefreshScope
public class TenantProperties {
    /**
     * 是否开启多租户
     */
    private Boolean enable = false;

    /**
     * 配置不进行多租户隔离的表名
     */
    private List<String> ignoreTables = new ArrayList<>();

    /**
     * 租戶ID字段
     */
    private String tenantIdColumn = "tenant_id";
}
